<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="/WEB-INF/jsp/sys/css.jsp"%>
<%@ include file="/WEB-INF/jsp/sys/uploader.jsp" %>
<%@page import="com.centit.util.RequestUtil" %>
<html lang="zh-cmn-Hans">
<style type="text/css">
.layui-input, .layui-select, .layui-textarea{
border-width: 0px;
}
</style>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/modules/util/static/ztree/css/metroStyle/metroStyle.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/modules/util/static/plugin/css/index.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/modules/util/static/ztree/js/jquery.ztree.all.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/modules/util/static/plugin/js/selectTree.js"></script>
<script type="text/javascript"	src="${pageContext.request.contextPath}/modules/airplanebaseinfo/airplanebaseinfo/ctrl/airplanebaseinfo.edit.js"></script>
<style>
    .stream-main-upload-box {
        border: none;
    }

    .centit-uploader .uploaded-files li {
        padding: 10px 20px 10px 10px;
    }

</style>
</head>
<body>
	<form class="layui-form" action="" style="padding: 10px"
		lay-filter="azdbqryForm">
		<input type="hidden" name="recId" id="recId" value="${object.recId}">

		<table class="viewTable">
			
			<tr>
				<th>电台证</th>
	                    <td colspan="3">
	                        <div class="layui-input-inline tdcontent" >
	                        <input type="hidden"  id="dtz" name="dtz"  value="${object.dtz}" />
	                        </div>
	                    </td>
			</tr>
			<tr>
				<th>适航证</th>
	                    <td colspan="3">
	                        <div class="layui-input-inline tdcontent" >
	                        <input type="hidden"  id="shz" name="shz"  value="${object.shz}" />
	                        </div>
	                    </td>
			</tr>
			<tr>
				<th>国籍证</th>
	                    <td colspan="3">
	                        <div class="layui-input-inline tdcontent" >
	                        <input type="hidden"  id="gjz" name="gjz"  value="${object.gjz}" />
	                        </div>
	                    </td>
			</tr>
			<tr>
			<th>办理意见</th>
				<td style="height:100px;" colspan="3">
					<div class="layui-input-block" style="margin-left: 0;">
						<textarea name="transContents" id="transContents" placeholder="请输入内容" class="layui-textarea">${transContent }</textarea>
					</div>
				</td>
			</tr>
		</table>
		<div style="text-align: center; margin-top: 20px">
			<button class="layui-btn" lay-submit="" lay-filter="saveszbg">保存</button>
			<button class="layui-btn layui-btn-primary" onclick="CloseWin()">关闭</button>
		</div>
	</form>
	<script>
var basePath= "${pageContext.request.contextPath}";
</script>

 <script type="text/javascript">
 window.UploaderPath='${cp:SYS_VALUE("uploaderpath")}/';
	index = setInterval(setUpload, '1000');
	function setUpload() {
	    try {
	    	  if (typeof $('#dtz', null).uploader === "function") { 
	              clearInterval(index);
	              $('#dtz', null).uploader({
	                  UploaderPath: window.UploaderPath,           
	                  ViewContextPath: window.UploaderPath,
	                  info: {
	                      optId: 'applyAdd'    
	                  }, onQueueComplete: function (result) {
	                        var obj;
	                        try {
	                            obj = JSON.parse(result);
	                        } catch (e) {
	                            obj = eval("(" + result + ")");
	                        }
	                          $.ajax({
	                            type: "POST",
	                            url: basePath + '/service/airplanebaseinfo/airplanebaseinfo/szsave',
	                            data: {
	                                fileName: obj.data.fileName,
	                                fileId: obj.data.fileId,
	                                type: '1',
	                                recId: $("#recId").val(),
	                                nodeInstId: $('input[name = nodeInstId]').val(),
	                                flowInstId: $('input[name = flowInstId]').val()
	                            },
	                            dataType: "json",
	                            success: function (data) {
	                            }
	                        }); 
	                        
	                    }
	              });
	          } else {
	        	  
	          }
	      } catch (e) {
	      }
	      try {
	    	  if (typeof $('#shz', null).uploader === "function") { 
	              clearInterval(index);
	              $('#shz', null).uploader({
	                  UploaderPath: window.UploaderPath,           
	                  ViewContextPath: window.UploaderPath,
	                  info: {
	                      optId: 'applyAdd'    
	                  }, onQueueComplete: function (result) {
	                        var obj;
	                        try {
	                            obj = JSON.parse(result);
	                        } catch (e) {
	                            obj = eval("(" + result + ")");
	                        }
	                          $.ajax({
	                            type: "POST",
	                            url: basePath + '/service/airplanebaseinfo/airplanebaseinfo/szsave',
	                            data: {
	                                fileName: obj.data.fileName,
	                                fileId: obj.data.fileId,
	                                type: '2',
	                                recId: $("#recId").val(),
	                                nodeInstId: $('input[name = nodeInstId]').val(),
	                                flowInstId: $('input[name = flowInstId]').val()
	                            },
	                            dataType: "json",
	                            success: function (data) {
	                            }
	                        }); 
	                        
	                    }
	              });
	          } else {
	        	  
	          }
	      } catch (e) {
	      }
	      try {
	    	  if (typeof $('#gjz', null).uploader === "function") { 
	              clearInterval(index);
	              $('#gjz', null).uploader({
	                  UploaderPath: window.UploaderPath,           
	                  ViewContextPath: window.UploaderPath,
	                  info: {
	                      optId: 'applyAdd'    
	                  }, onQueueComplete: function (result) {
	                        var obj;
	                        try {
	                            obj = JSON.parse(result);
	                        } catch (e) {
	                            obj = eval("(" + result + ")");
	                        }
	                          $.ajax({
	                            type: "POST",
	                            url: basePath + '/service/airplanebaseinfo/airplanebaseinfo/szsave',
	                            data: {
	                                fileName: obj.data.fileName,
	                                fileId: obj.data.fileId,
	                                type: '3',
	                                recId: $("#recId").val(),
	                                nodeInstId: $('input[name = nodeInstId]').val(),
	                                flowInstId: $('input[name = flowInstId]').val()
	                            },
	                            dataType: "json",
	                            success: function (data) {
	                            }
	                        }); 
	                        
	                    }
	              });
	          } else {
	        	  
	          }
	      } catch (e) {
	      }
	  }

 </script>
</body>
</html>
